<template>
        <h5>注册</h5>
        <table>
            <input type="text" placeholder="输入帐号" name="username">
            <input type="text" placeholder="输入密码" name="password">
            <input type="text" placeholder="输入验证码" name="vcode">
        </table>
</template>
<script setup lang='ts'>
import { onMounted, onUnmounted } from '@vue/runtime-core'
import { onActivated, onDeactivated } from 'vue';
//  在keep-alive中onMounted只会执行一次，onUnmounted不会执行
    onMounted(() => {
        console.log('reg===>mounted');
    });
    onUnmounted(()=> {
        console.log('reg=====>onUnmounted');
    });
    //  只有在keep-alive中才会有onActivated、onDeactivated
    onActivated(() => {
        console.log('reg===>onActivated');
    });
    onDeactivated(() => {
        console.log('reg====>onDeactivated');
    })
</script>
<script lang="ts">
    export default {
        name: "reg"
    }
</script>
<style>
    
</style>